<template>
	<view class="pop_bg">
		<view class="content-bg">
			<view class="content-tab">
				<view class="content-con">
					<view class="content-con1">
						核销码：
					</view>
					<view class="content-con2 code">
						{{info.code}}
					</view>
				</view>
				<view class="content-con">
					<view class="content-con1">
						核销位置：
					</view>

					<view class="content-con2">
						{{info.reach_address?info.reach_address:'----'}}
					</view>
				</view>
				<view class="content-con">
					<view class="content-con1">
						核销时间：
					</view>
					<view class="content-con2">
						{{info.reach_time?info.reach_time:'----'}}
					</view>
				</view>
				<view class="content-con">
					<view class="content-con1">
						核销图片：
					</view>
					<view class="content-con2">
						<view class="img_con" v-if="info.reach_images&&info.reach_images.split(',').length>0">
							<image :src="img" mode="aspectFill" v-for="img,index in info.reach_images.split(',')"
								:key="index"></image>
						</view>
						<view v-else>无</view>
					</view>
				</view>
				<view class="content-con">
					<view class="content-con1">
						完成位置：
					</view>

					<view class="content-con2">
						{{info.finish_address?info.finish_address:'----'}}
					</view>
				</view>
				<view class="content-con">
					<view class="content-con1">
						完成时间：
					</view>
					<view class="content-con2">
						{{info.finish_time?info.finish_time:'----'}}
					</view>
				</view>
				<view class="content-con">
					<view class="content-con1">
						完成图片：
					</view>
					<view class="content-con2">
						<view class="img_con" v-if="info.finish_images&&info.finish_images.split(',').length>0">
							<image :src="img" mode="aspectFill" v-for="img,index in info.finish_images.split(',')"
								:key="index"></image>
						</view>
						<view v-else>无</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: "writeoffrecords",
		props: {
			orderId: {
				type: [Number, String], // 根据实际情况确定id的数据类型，这里假设是数字或者字符串类型
				required: false, // 可以根据实际需求设置是否为必传属性
			},
		},
		watch: {
			orderId: {
				handler(n, o) {
					if (n) {
						this.rq.getData('order/order_log', {
							id: this.orderId
						}).then(res => {
							this.info = res.data
						})
					}
				}
			}
		},
		data() {
			return {
				info: {}
			};
		}
	}
</script>

<style lang="scss" scoped>
	.content-bg {
		position: relative;
	}
	.code{
		text-decoration: line-through;
	}
	.img_con {
		display: flex;
		flex-wrap: wrap;
		
		image{
			margin-right: 15rpx;
			margin-bottom: 15rpx;
		}
	}

	.content-tab {
		width: 702rpx;
		min-height: 862rpx;
		margin: 30rpx auto;
		background-color: #fff;
		border-radius: 16rpx;
		padding: 34rpx;
		box-sizing: border-box;

		.content-con {
			display: flex;
			margin-bottom: 40rpx;


			image {
				width: 152rpx;
				height: 152rpx;
				display: block;
				border-radius: 16rpx;
			}

			.content-con1 {
				font-size: 32rpx;
				color: #000;
				margin-right: 14rpx;
				width: 164rpx;
				flex-shrink: 0;
			}

			.content-con2 {
				font-size: 32rpx;
				color: #666666;
			}
		}
	}

	.header {
		width: 100%;
		height: auto;
		display: table;
		position: fixed;
		top: 0px;
		left: 0px;
		z-index: 10;
		background-color: #fff;

		.header-back {
			margin-left: 10rpx;
			height: 13px;
			line-height: 13px;
			position: absolute;
			left: 0;
			color: #000;
		}

		.hearder-content {
			font-size: 16px;
			font-weight: normal;
			line-height: 28px;
			text-align: center;
			display: flex;
			align-items: center;
			letter-spacing: 0px;
			color: #000;
		}

		.navon {
			width: 100%;
			height: auto;
			position: absolute;
			top: 0px;
			left: 0px;
			box-sizing: border-box;
			font-weight: 500;
			font-size: 36rpx;
			display: flex;
			align-items: center;
			justify-content: center;
		}

	}
</style>